﻿<?php include("conn.php");
      mysql_query('SET NAMES UTF8'); 
	  
class MyPrizeBean
{
	public $fulse;

	function __construct($fulse)
	{
		$this->fulse      = $fulse;
	}
}

	$prize = array();
	
 if($_REQUEST[userid]!=""){ 
          if($_REQUEST[niname]!=""){
	           $srat=mysql_query("update  user set niname='".$_REQUEST[niname]."'  where userid =".$_REQUEST[userid]);
	           $der=100;
		  }else  if($_REQUEST[sex]!=""){
	           $srat=mysql_query("update  user set sex='".$_REQUEST[sex]."'  where userid =".$_REQUEST[userid]);
	           $der=100;
		  }else  if($_REQUEST[city]!=""){
		      $srat=mysql_query("update  user set city='".$_REQUEST[city]."'  where userid =".$_REQUEST[userid]);
			  $srat=mysql_query("update  user set province='".$_REQUEST[province]."'  where userid =".$_REQUEST[userid]);
	          $der=100;
		  }else  if($_REQUEST[phone]!=""){
			  $srat=mysql_query("update  user set phone='".$_REQUEST[phone]."'  where userid =".$_REQUEST[userid]);
	          $der=100;
		  }else{
		  	  $der=300;
		  }
	}else{
			  $der=300;
  }

   $prize[] = new MyPrizeBean($der);
   echo json_encode($prize);
?>